define(['app'], function(app) {
	'use strict';

	//实例化方法
	var factory = function(Http) {

	
		//返回信息
		return {
			//发送红包
			packets_grant: function(money, memo,stores, paypass,callback) {
				var targets = new Object();
				targets.stores = stores;
				targets = JSON.stringify(targets);
				Http.post({
					method: 'member.packets.grant',
					count: 1,
					money: money,
					memo: memo,
					rule: 1,
					type:1,
					targets: targets,
					paypass:paypass
				}, function(result) {
					if(callback)
						callback(result);
				}, function(e) {

				}, function() {

				});
			}
		

		};
	}

	factory.$inject = ['Http'];
	return app.registerService("Distributor_redbag", factory);
});